/*  1:   */package com.linkage.bss.commons.util;
/*  2:   */
/* 13:   */public class StringUtil
/* 14:   */{
/* 15:   */  public static boolean isEmpty(String str)
/* 16:   */  {
/* 17:17 */    return (str == null) || ("".equals(str));
/* 18:   */  }
/* 19:   */  
/* 33:   */  public static String replace(String text, String repl, String with)
/* 34:   */  {
/* 35:35 */    if ((text == null) || (repl == null) || (with == null) || (repl.length() == 0)) {
/* 36:36 */      return text;
/* 37:   */    }
/* 38:   */    
/* 39:39 */    StringBuffer buf = new StringBuffer(text.length());
/* 40:40 */    int searchFrom = 0;
/* 41:   */    for (;;) {
/* 42:42 */      int foundAt = text.indexOf(repl, searchFrom);
/* 43:43 */      if (foundAt == -1) {
/* 44:   */        break;
/* 45:   */      }
/* 46:   */      
/* 47:47 */      buf.append(text.substring(searchFrom, foundAt)).append(with);
/* 48:48 */      searchFrom = foundAt + repl.length();
/* 49:   */    }
/* 50:50 */    buf.append(text.substring(searchFrom));
/* 51:   */    
/* 52:52 */    return buf.toString();
/* 53:   */  }
/* 54:   */}


/* Location:           E:\workspace\sungl111\workspace_promotion\BizHallConfig\WebRoot\WEB-INF\lib\bss.commons-0.1.jar
 * Qualified Name:     com.linkage.bss.commons.util.StringUtil
 * JD-Core Version:    0.7.0-SNAPSHOT-20130630
 */